1. Technical Field
The present invention relates to a method and apparatus for internally calibrating mixed-signal electronic devices that use resistors as part of their design, and in particular to a method and apparatus for internally calibrating a digital-to-analog converter. The calibration method tunes the electronic devices using an extended R/2R ladder network to obtain improved accuracy in resistance, current, voltage, timing, etc.
2. Description of Related Art
Many mixed-signal electronic devices utilize resistances to perform a variety of functions such as voltage and current regulation, timing circuitry, etc. Due to manufacturing errors and changes of the parameters with operating conditions (temperature) the desired function may not be realized precisely. By adding an R/2R ladder and additional circuitry for detection of changes and calibration, the device can self-adjust the ladder switches to improve the device's functionality. For example, R/2R ladder networks provide a simple means to convert digital information to an analog output.
Referring now to the drawings and in particular to FIG. 1, there is depicted a conventional R/2R Digital to Analog converter. Digital information can be presented to the ladder as individual bits of a digital word switched between a reference voltage (Vr) and ground. Depending on the number and location of the bits switched to Vr or ground, Vout will vary between 0 volts and −Vr. If all inputs are connected to ground, 0 volts is produced at the output, if all inputs are connected to Vr, the output voltage approaches −Vr, and if some inputs are connected to ground and some to Vr then an output voltage between 0 volts and −Vr occurs. These inputs (also called bits in the digital parlance) range from the most significant bit (MSB) to the least significant bit (LSB). The MSB, when activated, causes the greatest change in the output voltage and the LSB, when activated, will cause the smallest change in the output voltage. If we label the bits (or inputs) bit 1 to bit n, the output voltage caused by connecting a particular bit to Vr with all other bits grounded is:Vout=Vr/2n  (1)
where n is the bit number.
Since an R/2R ladder is a linear circuit, we can apply the principle of superposition to calculate Vout. The expected output voltage is calculated by summing the effect of all bits connected to Vr.
When specifying an R/2R ladder, consideration must be given to the accuracy of the ladder output as well as the resolution of the R/2R ladder in bits. The ratio tolerances of the individual resistors within the R/2R ladder, the resistance of the switches used at the R/2R ladder inputs and the possible resister degradation all can affect the output accuracy of a DAC.
The ladder operates as an array of voltage dividers and their output accuracies are solely dependent on how well each resistor is matched to the others. Ideally, resistors within the ladder are matched so that the voltage ratio for a given bit is exactly half of that for the preceding bit. In Practice the output accuracy of the R/2R ladder can be affected by the ratio tolerances of the individual resistors within the R/2R ladder. It is very possible that voltage output tolerances from each individual bit add up to a level that requires attention for some sensitive applications, e.g., high definition audio digitizing and decoding.
R/2R inputs are switched between ground and Vr in order to create the digital word that is converted to an analog voltage output. In practical applications, these switches (usually solid state) carry some nominal resistance. Actual switch resistances can be as high as 50 ohms in some devices. Since the switch is connected in series to the 2R resistor, the switch resistance (Rsw) affects the value of the 2R leg of the circuit and thus, the output accuracy of the R/2R ladder.
The resistances of the components can be affected by environments such as temperature, magnetic fields, etc. As such, malfunction of the resistors are also possible because of wearing out from time. Consequently, it is desirable to provide a method and apparatus for internally calibrating a DAC. The calibration can be triggered by an instruction from a user or by the sensing of the environmental changes automatically.